﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

using Clipper.BLL.Supplier;
using Global;

namespace Clipper
{
    /// <summary>
    /// WinTest.xaml 的交互逻辑
    /// </summary>
    public partial class WinTest : Window
    {
        public WinTest()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            
            if (ServiceProvider.gReactionStripList == null)
                return;

            // 设置DataGrid属性
            grdItems.RowHeight = 30;
            grdItems.ColumnWidth = 50;
            DetectionOrder detectionOrder = new DetectionOrder();
            ObservableCollection<Clipper.Model.ReactionCup> itemList = new ObservableCollection<Model.ReactionCup>();
           
            detectionOrder.StatisticsReagentKit(ServiceProvider.ReagentKitVM);
            detectionOrder.CheckReagent(ServiceProvider.WorkSheetVM.WorkItemList, ServiceProvider.ReagentKitVM.ReagentItemList);
            detectionOrder.GenerateCupList(ServiceProvider.WorkSheetVM);
            grdItems.ItemsSource = detectionOrder.CupList;
            ServiceProvider.gReactionStripList = detectionOrder.StripList;
        }

    }
}
